from openpyxl import load_workbook
from openpyxl.styles import Border, Side
workbook = load_workbook('F:\\python\\第5章\\出库表4.xlsx')
worksheet = workbook['Sheet1']
cell = worksheet['C2']
style1 = Side(border_style='thick', color='000000')
style2 = Side(border_style='dashDot', color='FF0000')
cell.border = Border(left=style1, right=style1, top=style2, bottom=style2)
workbook.save('F:\\python\\第5章\\出库表5.xlsx')
